Optimal. Leaf size=42 \[ -\frac {\sqrt {a+a \cos (x)}}{x}-\frac {1}{2} \sqrt {a+a \cos (x)} \sec \left (\frac {x}{2}\right ) \text {Si}\left (\frac {x}{2}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.06, antiderivative size = 42, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 3, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.214, Rules used = {3400, 3378,
3380} \begin {gather*} -\frac {1}{2} \text {Si}\left (\frac {x}{2}\right ) \sec \left (\frac {x}{2}\right ) \sqrt {a \cos (x)+a}-\frac {\sqrt {a \cos (x)+a}}{x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3378
Rule 3380
Rule 3400
Rubi steps
\begin {align*} \int \frac {\sqrt {a+a \cos (x)}}{x^2} \, dx &=\left (\sqrt {a+a \cos (x)} \sec \left (\frac {x}{2}\right )\right ) \int \frac {\cos \left (\frac {x}{2}\right )}{x^2} \, dx\\ &=-\frac {\sqrt {a+a \cos (x)}}{x}-\frac {1}{2} \left (\sqrt {a+a \cos (x)} \sec \left (\frac {x}{2}\right )\right ) \int \frac {\sin \left (\frac {x}{2}\right )}{x} \, dx\\ &=-\frac {\sqrt {a+a \cos (x)}}{x}-\frac {1}{2} \sqrt {a+a \cos (x)} \sec \left (\frac {x}{2}\right ) \text {Si}\left (\frac {x}{2}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.04, size = 33, normalized size = 0.79 \begin {gather*} -\frac {\sqrt {a (1+\cos (x))} \left (2+x \sec \left (\frac {x}{2}\right ) \text {Si}\left (\frac {x}{2}\right )\right )}{2 x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.03, size = 0, normalized size = 0.00 \[\int \frac {\sqrt {a +a \cos \left (x \right )}}{x^{2}}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [C] Result contains complex when optimal does not.
time = 0.52, size = 23, normalized size = 0.55 \begin {gather*} -\frac {1}{4} \, \sqrt {2} \sqrt {a} {\left (i \, \Gamma \left (-1, \frac {1}{2} i \, x\right ) - i \, \Gamma \left (-1, -\frac {1}{2} i \, x\right )\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: TypeError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\sqrt {a \left (\cos {\left (x \right )} + 1\right )}}{x^{2}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.43, size = 34, normalized size = 0.81 \begin {gather*} -\frac {\sqrt {2} {\left (x \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, x\right )\right ) \operatorname {Si}\left (\frac {1}{2} \, x\right ) + 2 \, \cos \left (\frac {1}{2} \, x\right ) \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, x\right )\right )\right )} \sqrt {a}}{2 \, x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.02 \begin {gather*} \int \frac {\sqrt {a+a\,\cos \left (x\right )}}{x^2} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________